<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragment::head(~{::title})">
    <meta charset="UTF-8">
    <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>CodeMan丶|搜索</title>
    <link href="../static/css/semantic.min.css" rel="stylesheet">
    <link href="../static/css/style.css" rel="stylesheet">
</head>
<body>
<!--导航 -->
<nav th:replace="_fragment::menu(3)" class="ui inverted attached segment m-padding-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">我的博客</h2>
            <a href="#" class="m-item item m-mobile-hide"><i class="home mini icon"></i>首页</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="idea mini icon "></i>分类</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="tags mini icon"></i>标签</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="clone mini icon"></i>归档</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="info mini icon"></i>关于我</a>
            <div class="right m-item item m-mobile-hide">
                <div class="ui transparent inverted icon input">
                    <input type="text" placeholder="Search...">
                    <i class="search link icon"></i>
                </div>
            </div>
        </div>
    </div>
    <div class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </div>
</nav>

<!-- 中间内容 -->
<div class="m-container-small m-padding-tb-small m-container-height">
    <div class="ui container">
        <!--header -->
        <div class="ui top attached segment">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <h3 class="ui teal header">搜索内容: <span class="ui orange header m-inline-block m-margin-left-small" th:text="${query}">Java和springboot</span></h3>
                </div>
                <div class="column right aligned">
                    共查询到 <h3 class="ui orange header m-inline-block" th:text="${page.content.size()}">13</h3> 个结果
                </div>
            </div>
        </div>
        <div class="ui top attached teal segment">
            <div class="ui m-padding-lr-responsive vertical segment m-padding-tb-small" th:each="blog:${page.content}">
                <div class="ui mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <h3 class="ui header">
                            <a href="" target="_blank" class="m-black" th:href="@{/blog/{id}(id=${blog.id})}" th:text="${blog.title}"> 你知道什么是真的帅吗？</a>
                        </h3>
                        <p class="m-text m-blog-body" th:text="${blog.content}">　从2011年的10月份开始，LZ已经走过了差不多7年多的职业生涯，回想起来，真的有种恍如隔世的感觉。
                            　　随着年龄越来越大，LZ的文章产出也越来越少，除了偶尔写写小说以外，其它文章基本上很少产出了。
                            　　尤其是技术方面的文章，LZ已经基本停产了。</p>
                        <div class="ui two row grid ">
                            <div class="ui row">
                                <div class="eleven wide column">
                                    <div class="ui horizontal link list">
                                        <div class="item">
                                            <img th:src="${blog.user.avatar}" src="../static/images/girl.jpeg" alt="" class="ui avatar image">
                                            <div class="content"><a href="#" class="header" th:text="${blog.user.nickname}">彭阳宴</a></div>
                                        </div>
                                        <div class="item">
                                            <i class="calendar icon"></i>  <span th:text="${#dates.format(blog.updateTime,'YYYY-MM-dd HH:mm')}">2020-03-09</span>
                                        </div>
                                        <div class="item">
                                            <i class="eye icon"></i> <span th:text="${blog.views}">200</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="right aligned five wide column">
                                    <a href="#" class="ui teal basic label m-padding-mini" th:text="${blog.type.name}">认知升级</a>
                                </div>
                            </div>
                            <div class="row">
                                <div class="column">
                                    <a href="#" class="ui teal m-padding-mini basic left pointing label m-margin-tp-small" th:each="item:${blog.tags}"><span th:text="${item.name}">方法论</span></a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="five wide column">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                            <img src="../static/images/girl.jpeg" th:src="${blog.firstPicture}" th:alt="${blog.title}" class="ui rounded image" style="width: 100%;height: 220px;">
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <div class="ui attached segment">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <a href="#" th:href="@{/search(query=${query},page=${page.number - 1})}"class="ui mini basic teal button" th:unless="${page.isFirst()}">上一页</a>
                </div>
                <div class="column right aligned">
                    <a href="#" th:href="@{/search(query=${query},page=${page.number + 1})}" class="ui mini basic teal button" th:unless="${page.isLast()}">下一页</a>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 底部footer -->
<footer th:replace="_fragment::footer" class="ui inverted vertical segment m-margin-top-small">
    <div class="ui center aligned container">
        <div class="ui stackable inverted divided grid m-padding-tb-big">
            <div class="three wide column">
                <div class="ui item">
                    <img src="../static/images/girl.jpeg" alt="" class="ui rounded image m-inline-block" style="width: 100px;">
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">用户故事{ user story }</a>
                    <a href="#" class="item">用户故事{ user story }</a>
                    <a href="#" class="item">用户故事{ user story }</a>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">用户故事{ user story }</a>
                    <a href="#" class="item">用户故事{ user story }</a>
                    <a href="#" class="item">用户故事{ user story }</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                <p class="m-text-thin m-text-spaced m-opacity-mini">xxxxxxxxxxxxxxx</p>
            </div>
        </div>
        <div class="ui inverted selection divider"></div>
        <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright © 2020 - 2021 Mr.Peng</p>
    </div>
</footer>

<!--/*/<th:block th:replace="_fragment::script">/*/-->
<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/semantic.min.js"></script>
<!--/*/</th:block>/*/-->
<script>
    $('.menu.toggle').click(function () {
      $('.m-item').toggleClass('m-mobile-hide')
    });
    $('#payButton').popup({
      popup: $('.payQR.popup'),
      on: 'click',
      position: 'bottom center'
    });
</script>
</body>
</html>